from db import Base
from sqlalchemy import Column,String,Integer # 内置的创建类的方法属性
from sqlalchemy.ext.declarative import declarative_base # 基础类模块


# 创建用户表
class User(Base):
    # 定义表名
    __tablename__ = 'user'
    # 自定义属性
    id = Column(Integer,primary_key=True)
    account = Column(String(30))
    password = Column(String(30))
    gender = Column(String(30))
    phone = Column(String(50))
    email = Column(String(50))
    address = Column(String(50))
    social = Column(Integer,default=0)


# Base.metadata.create_all()